package com.thoughtworks.yuyijq.generate;

import com.intellij.openapi.components.ApplicationComponent;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.project.ProjectManager;
import com.intellij.openapi.project.ProjectManagerListener;
import org.jetbrains.annotations.NotNull;

/**
 * User: yuyijq
 * Date: Oct 8, 2010
 * Time: 11:53:52 PM
 */
public class GenerateEqualsAndHashCodePlugin implements ApplicationComponent, ProjectManagerListener{
    @NotNull
    public String getComponentName() {
        return "GenerateEqualsAndHashCode";
    }

    public void initComponent() {
        ProjectManager.getInstance().addProjectManagerListener(this);
    }

    public void disposeComponent() {
        ProjectManager.getInstance().removeProjectManagerListener(this);
    }

    public void projectOpened(Project project) {
    }

    public boolean canCloseProject(Project project) {
        return true; 
    }

    public void projectClosed(Project project) {
    }

    public void projectClosing(Project project) {
    }
}
